package jpg3.jpg3zad1;

/**
 * Autor: Daniel Michalski
 * Data: 05.07.13
 */

public class Main {
    public static void main(String[] args) {
        B x = new B();
        A y = x;

        System.out.println(y.a);
        System.out.println(y.m());
    }
}

class A {
    int a = 1;

    public String m() {
        return "Metoda z A";
    }
}

class B extends A {
    int a = 2;

    public String m() {
        return "Metoda z B";
    }
}
